package com.comdev.ctrls;

import com.comdev.common.WebPath;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * User: zhu
 * Date: 13-10-20
 * Time: 下午2:22
 */

@Controller
@RequestMapping("menu")
public class menu
{
    @RequestMapping("ceshi")
    @ResponseBody
    public String ceshi()
    {
        return "<h3 class=\"f14\"><span class=\"switchs cu on\" title=\"展开与收缩\"></span>测试</h3>\n" +
                "\n" +
                "<ul>\n" +
                "<li id=\"_MP11\" class=\"sub_menu\"><a href=\"javascript:_MP(11,'"+ WebPath.SYS_PATH+"/curd/show');\" hidefocus=\"true\" style=\"outline:none;\">列表管理1</a></li>\n" +
                "<li id=\"_MP12\" class=\"sub_menu\"><a href=\"javascript:_MP(12,'"+WebPath.SYS_PATH+"/curd/show2');\" hidefocus=\"true\" style=\"outline:none;\">列表管理2</a></li>\n" +
                "<li id=\"_MP15\" class=\"sub_menu\"><a href=\"javascript:_MP(15,'"+WebPath.SYS_PATH+"/upload/show');\" hidefocus=\"true\" style=\"outline:none;\">弹窗测试</a></li>\n" +
                "</ul>\n" +
                "\n" +
                "\n" +
                "<h3 class=\"f14\"><span class=\"switchs cu on\" title=\"展开与收缩\"></span>测试2</h3>\n" +
                "<ul>\n" +
                "<li id=\"_MP21\" class=\"sub_menu\"><a href=\"javascript:_MP(21,'content/content/main')\" hidefocus=\"true\" style=\"outline:none;\">tt</a></li>\n" +
                "<li id=\"_MP22\" class=\"sub_menu\"><a href=\"javascript:_MP(22,'content/content/main')\" hidefocus=\"true\" style=\"outline:none;\">ttt</a></li>\n" +
                "</ul>\n" +
                "\n" +
                "<h3 class=\"f14\"><span class=\"switchs cu on\" title=\"展开与收缩\"></span>测试3</h3>\n" +
                "<ul>\n" +
                "<li id=\"_MP31\" class=\"sub_menu\"><a href=\"javascript:_MP(31,'content/content/main')\" hidefocus=\"true\" style=\"outline:none;\">tt</a></li>\n" +
                "<li id=\"_MP32\" class=\"sub_menu\"><a href=\"javascript:_MP(32,'content/content/main')\" hidefocus=\"true\" style=\"outline:none;\">ttt</a></li>\n" +
                "<li id=\"_MP33\" class=\"sub_menu\"><a href=\"javascript:_MP(33,'content/content/main')\" hidefocus=\"true\" style=\"outline:none;\">tttt</a></li>\n" +
                "</ul>\n" +
                "\n" +
                "<h3 class=\"f14\"><span class=\"switchs cu on\" title=\"展开与收缩\"></span>获取数据库信息</h3>\n" +
                "<ul>\n" +
                "<li id=\"_MP41\" class=\"sub_menu\"><a href=\"javascript:_MP(41,'"+WebPath.SYS_PATH+"/dbinfo/init')\" hidefocus=\"true\" style=\"outline:none;\">获取</a></li>\n" +
                "</ul>\n" +
                " \n" +
                "<script type=\"text/javascript\">\n" +
                "$(\".switchs\").each(function(i){\n" +
                "\tvar ul = $(this).parent().next();\n" +
                "\t$(this).click(\n" +
                "\tfunction(){\n" +
                "\t\tif(ul.is(':visible')){\n" +
                "\t\t\tul.hide();\n" +
                "\t\t\t$(this).removeClass('on');\n" +
                "\t\t\t\t}else{\n" +
                "\t\t\tul.show();\n" +
                "\t\t\t$(this).addClass('on');\n" +
                "\t\t}\n" +
                "\t})\n" +
                "});\n" +
                "</script>";
    }

}


